package com.lanju.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name="expected_fixed_income")
public class ExpectedFixedIncome implements Serializable{
	
	private static final long serialVersionUID = -1600219019264329257L;
	/**
	 * 固定收益id
	 */
	private String incomeId;
	/**
	 * 预期收入开始时间
	 */
	private Date expectedStartTime;
	/**
	 * 预期收入结束时间
	 */
	private Date expectedEndTime;
	/**
	 * 预期收入
	 */
	private Integer income;
	
	private Contract contract;
	
	@Id
	@Column(name="incomeId",unique=true,nullable=false)
	public String getIncomeId() {
		return incomeId;
	}
	public void setIncomeId(String incomeId) {
		this.incomeId = incomeId;
	}
	@Column(name="expectedStartTime")
	public Date getExpectedStartTime() {
		return expectedStartTime;
	}
	public void setExpectedStartTime(Date expectedStartTime) {
		this.expectedStartTime = expectedStartTime;
	}
	@Column(name="expectedEndTime")
	public Date getExpectedEndTime() {
		return expectedEndTime;
	}
	public void setExpectedEndTime(Date expectedEndTime) {
		this.expectedEndTime = expectedEndTime;
	}
	@Column(name="income")
	public Integer getIncome() {
		return income;
	}
	public void setIncome(Integer income) {
		this.income = income;
	}
	 @JsonIgnore
	 @ManyToOne(fetch=FetchType.LAZY)
	 @JoinColumn(name="contractId", nullable=false)
	public Contract getContract() {
		return contract;
	}
	public void setContract(Contract contract) {
		this.contract = contract;
	}
	
}
